package com.sg.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sg.framework.common.annotations.OrderFlag;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 主表，一个小版本，表类型（空间独有）
 *
 * @author xxx
 */
@Data
@Accessors(chain = true)
@TableName("oms_unstructured_data")  //2-7-01 文档表 oms_unstructured_data
public class OmsUnstructuredData implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 文档ID:
     */
    @TableId(value = "unstructured_data_id", type = IdType.ASSIGN_UUID)
    @NotNull(message = "unstructuredDataId不能为空")
    private String unstructuredDataId;

    /**
     * 文档类型:
     */
    @TableField(value = "unstructured_data_type")
    @NotNull(message = "文档类型不能为空")
    @Schema(description = "文档类型")
    private String unstructuredDataType;

    /**
     * 文档明细类型:
     */
    @TableField(value = "unstructured_data_detail_type")
    @NotNull(message = "文档明细类型不能为空")
    @Schema(description = "文档明细类型")
    private String unstructuredDataDetailType;

    /**
     * 是否支持预览:
     */
    @TableField(value = "is_support_preview")
    @NotNull(message = "是否支持预览不能为空")
    @Schema(description = "是否支持预览")
    private String isSupportPreview;

    /**
     * 是否个人网盘文件:
     */
    @TableField(value = "is_user_upload ")
    @Schema(description = "isUserUpload")
    private String isUserUpload;

    /**
     * 文件夹ID:
     */
    @TableField(value = "unstructured_data_folder_id")
    @NotNull(message = "文件夹ID不能为空")
    @Schema(description = "文件夹ID")
    private String unstructuredDataFolderId;

    /**
     * 文件相对路径地址:
     */
    @TableField(value = "file_relative_path_access")
    @NotNull(message = "文件相对路径地址不能为空")
    @Schema(description = "文件相对路径地址")
    private String fileRelativePathAccess;

    /**
     * 文档后缀:
     */
    @TableField(value = "postfix")
    @NotNull(message = "文档后缀不能为空")
    @Schema(description = "文档后缀")
    private String postfix;

    /**
     * 文件大小:
     */
    @TableField(value = "file_size")
    @NotNull(message = "文件大小不能为空")
    @Schema(description = "文件大小")
    private String fileSize;

    /**
     * 文档编号:
     */
    @TableField(value = "unstructured_data_number")
    @NotNull(message = "文档编号不能为空")
    @Schema(description = "文档编号")
    private String unstructuredDataNumber;

    /**
     * 文档名称:
     */
    @TableField(value = "unstructured_data_name")
    @NotNull(message = "文档名称不能为空")
    @Schema(description = "文档名称")
    private String unstructuredDataName;

    /**
     * 文档简介:
     */
    @TableField(value = "unstructured_data_desc")
    @Schema(description = "文档简介")
    private String unstructuredDataDesc;

    /**
     * 冗余是否结果文档:
     */
    @TableField(value = "is_result")
    @NotNull(message = "冗余是否结果文档不能为空")
    @Schema(description = "冗余是否结果文档")
    private String isResult;

    /**
     * 生命周期状态:
     */
    @TableField(value = "subject_life_cycle")
    @NotNull(message = "生命周期状态不能为空")
    @Schema(description = "生命周期状态")
    private String subjectLifeCycle;

    /**
     * 是否存档:
     */
    @TableField(value = "is_archive")
    @NotNull(message = "是否存档不能为空")
    @Schema(description = "是否存档")
    private String isArchive;

    /**
     * 操作人就职记录ID:
     */
    @TableField(value = "operation_induction_id")
    @NotNull(message = "操作人就职记录ID不能为空")
    @Schema(description = "操作人就职记录ID")
    private String operationInductionId;

    /**
     * 创建人就职记录ID:
     */
    @TableField(value = "create_induction_id")
    @NotNull(message = "创建人就职记录ID不能为空")
    @Schema(description = "创建人就职记录ID")
    private String createInductionId;

    /**
     * 发布人就职记录ID:
     */
    @TableField(value = "release_induction_id")
    @Schema(description = "发布人就职记录ID")
    private String releaseInductionId;

    /**
     * 存档人就职记录ID:
     */
    @TableField(value = "archive_induction_id")
    @Schema(description = "存档人就职记录ID")
    private String archiveInductionId;

    /**
     * 是否作废:
     */
    @TableField(value = "is_valid")
    @NotNull(message = "是否作废不能为空")
    @Schema(description = "是否作废")
    private String isValid;

    /**
     * 操作时间:
     */
    @TableField(value = "operate_time")
    @NotNull(message = "操作时间不能为空")
    @Schema(description = "操作时间")
    @OrderFlag(orderType = "desc")
    private Date operateTime;

    /**
     * 创建时间:
     */
    @TableField(value = "create_time")
    @NotNull(message = "创建时间不能为空")
    @Schema(description = "创建时间")
    private Date createTime;

    /**
     * 创建于空间ID:
     */
    @TableField(value = "space_id")
    @NotNull(message = "创建于空间ID不能为空")
    @Schema(description = "创建于空间ID")
    private String spaceId;

    /**
     * 发布时间:
     */
    @TableField(value = "release_time")
    @Schema(description = "发布时间")
    private Date releaseTime;

    /**
     * 创建于联盟应用ID:
     */
    @TableField(value = "app_id")
    @NotNull(message = "创建于联盟应用ID不能为空")
    @Schema(description = "创建于联盟应用ID")
    private String appId;

    /**
     * 存档时间:
     */
    @TableField(value = "archive_time")
    @Schema(description = "存档时间")
    private Date archiveTime;
}
